/**
 * Created by renzhiqiang on 17/7/24.
 */
var path = require("path");
module.exports ={
   entry:{ index : "./src/router.js"},
   // entry:{ index : "./src/reduxRouter.js"},
   output:{
      path:path.resolve(__dirname,"build"),
      filename:"[name].js"
   },
   module: {
      loaders: [{
         test: /\.js$/,
         exclude: /node_modules/,
         loader: 'babel-loader'
         // query: {
         //    presets: ['es2015', 'stage-3']
         // }
      },{
         test: /\.css$/,
         exclude: /node_modules/,
         loader: 'style!css?modules&localIdentName=[name]__[local]-[hash:base64:5]'
      }]
   },
   devtool:"source-map",
   devServer:{
      //使能历史记录api
      historyApiFallback:true,
      inline:true,
      overlay:{
         errors:true,
         warnings:true,
      },
      proxy:{
         '/cadillac': {
            target: 'http://testboss.op.my7v.com',
            changeOrigin: true,
            secure: false,
            router: {
               // when request.headers.host == 'dev.localhost:3000',
               // override target 'http://www.example.org' to 'http://localhost:8000'
               'http://localhost:63343' : 'http://localhost:8080'
            }
         }
      }
   },
}